package com.itheima.read.write;

import java.io.FileWriter;
import java.io.IOException;

public class Test {
    //了解文件字符输出流的基本使用

    public static void main(String[] args) throws IOException {
        try (
                FileWriter fw = new FileWriter("D:\\java-base-ws\\JavaAdvanceProject\\day14_IO\\src\\com\\itheima\\read\\write\\aikun.txt");
                ){

            //写入数据
            fw.write("hello world");
            fw.write("\r\n");
            fw.write("hello aikun");
            fw.write("\r\n");
            fw.write(97);
            fw.write("\r\n");
            char[] chars = {'大','S','b','远'};
            fw.write(chars);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }


    }
}
